package com.wxq.demo.controller;

import com.wxq.demo.pojo.Book;
import com.wxq.demo.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BookController {
    @Autowired
    private BookService bookService;

    @GetMapping("/search")
    public void search() {
        Book book = bookService.getMaxidBook();
        System.out.println(book.getId() + ";" + book.getName() + ";" + book.getAuthor());
    }
}
